package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// OptionsEntityToDto entity data transfer
func OptionsEntityToDto(options []*entity.Option) []*model.OptionInfo {
	out := make([]*model.OptionInfo, 0, len(options))
	for _, c := range options {
		out = append(out, OptionEntityToDto(c))
	}
	return out
}

// OptionEntityToDto entity data transfer
func OptionEntityToDto(e *entity.Option) *model.OptionInfo {
	return &model.OptionInfo{

		Id: e.Id,

		TitleId: e.TitleId,

		Image: e.Image,

		Desc: e.Desc,

		AnalysisText: e.AnalysisText,
		AnalysisImg:  e.AnalysisImg,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
